<%@ page language="java" contentType="text/html; charset=utf-8"%>
<%@ taglib uri="/struts-tags" prefix="s" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
	<head>
		<script type="text/javascript" src="jquery/jquery-1.8.2.js">
		</script>
		<title>我的消费</title>
		<script language="javascript">
		function firm(){
			if(confirm("你确定删除该消费吗?")){
				event.returnValue=true;
			}else{
				event.returnValue=false;
			}

		}
		</script>
		<link rel="stylesheet" type="text/css" href='<s:url value="/styles.css" />'>
	</head>
	<body>
		<s:include value="/header.jsp" />
		<s:if test="#session['user'] != null">
			<div class="divNavigatorOuterFrame">
				<div class="divNavigatorInnerFrame" style="text-align: right;">
					欢迎<s:property value="#session['user'].name" />&nbsp;&nbsp;
				</div>
			</div>
			<div class="divWhiteLine"></div>
		</s:if>		
		<s:if test="myDaycosts.isEmpty() == true">目前您没有任何消费项!</s:if >
		<s:else>
			<table>
				<tr>
					<td colspan="27" style="height: 5px"></td>
				</tr>
				<tr>
					<td colspan="27" class="tdHeader">我的消费:</td>
				</tr>
				<tr>
					<td colspan="27" style="height: 5px"></td>
				</tr>
				<tr>
					<td class="tdListHeader">ID</td>
					<td class="tdListHeader">消费时间</td>
					<td class="tdListHeader">早餐</td>
					<td class="tdListHeader">午餐</td>
					<td class="tdListHeader">晚餐</td>
					<td class="tdListHeader">宵夜</td>
					<td class="tdListHeader">看病</td>
					<td class="tdListHeader">学习用品</td>
					<td class="tdListHeader">生活用品</td>
					<td class="tdListHeader">公汽</td>
					<td class="tdListHeader">的士</td>
					<td class="tdListHeader">长途汽车</td>
					<td class="tdListHeader">火车</td>
					<td class="tdListHeader">订票费</td>
					<td class="tdListHeader">轮船</td>
					<td class="tdListHeader">飞机</td>
					<td class="tdListHeader">酒店</td>
					<td class="tdListHeader">礼物</td>
					<td class="tdListHeader">房租</td>
					<td class="tdListHeader">水电费</td>
					<td class="tdListHeader">宽带费</td>
					<td class="tdListHeader">电话费</td>
					<td class="tdListHeader">还贷款/还钱</td>
					<td class="tdListHeader">其他</td>
					<td class="tdListHeader">合计</td>
					<td class="tdListHeader">修改</td>
					<td class="tdListHeader">删除</td>
				</tr>
				<s:iterator value="myDaycosts">
					<s:set var="sId" value="id" />
					<tr>
						<td><s:property value="id" /></td>
						<td><s:date name="costtime" format="yyyy/MM/dd"/></td>
						<td><s:property value="breakfast" /></td>
						<td><s:property value="lunch" /></td>
						<td><s:property value="dinner" /></td>
						<td><s:property value="supper" /></td>
						<td><s:property value="ill" /></td>
						<td><s:property value="schoolsupplies" /></td>
						<td><s:property value="articleuse" /></td>
						<td><s:property value="bus" /></td>
						<td><s:property value="texi" /></td>
						<td><s:property value="coach" /></td>
						<td><s:property value="train" /></td>
						<td><s:property value="booking" /></td>
						<td><s:property value="ship" /></td>
						<td><s:property value="airplane" /></td>
						<td><s:property value="hotel" /></td>
						<td><s:property value="gift" /></td>
						<td><s:property value="rent" /></td>
						<td><s:property value="waterelectricity" /></td>
						<td><s:property value="broadband" /></td>
						<td><s:property value="phone" /></td>
						<td><s:property value="payback" /></td>
						<td><s:property value="others" /></td>
						<td bgcolor="red"><s:property value="total" /></td>
						<td><a href='<s:url value="DaycostAction_editDaycost"><s:param name="sId" value="#sId"/></s:url>' class="aList">修改</a></td>
						<td><a href='<s:url value="DaycostAction_deleteDaycost"><s:param name="sId" value="#sId" /></s:url>' class="aList" onclick="firm()">删除</a></td>
					</tr>
				</s:iterator>
				<s:if test="totalDc == null"></s:if >
				<s:else>
					<tr>
						<td colspan="2" class="tdListHeader">合计</td>
						<s:iterator value="totalDc" status="stts">
							<td bgcolor="red"><s:property value="totalDc[#stts.index]" /></td>
						</s:iterator>
			
				</tr>
				</s:else>
			</table>
		</s:else>
	</body>
</html>